// 验证是否登录
var authService = (authService, $state, $cookieStore) => {
    return  authService.isAuthorized()
            .then((data) => {
                if (!data) {
                    $cookieStore.put('prevPage', location.href);
                    $state.go('loginindex.login')
                }
            })
}

authService.$inject = ['authService', '$state', '$cookieStore'];

export default authService;